var TitleMessage = {  
    time: 0,  
    title: document.title,  
    timer: null,  
    // 显示新消息提示  
    show: function () {
    	if(this.timer!=null) {
    		TitleMessage.clear();
    	}
        var title = TitleMessage.title.replace("【　　　】", "").replace("【新资源】", "");  
        // 定时器，设置消息切换频率闪烁效果就此产生  
        TitleMessage.timer = setTimeout(function () {  
            TitleMessage.time++;  
            TitleMessage.show();  
            if (TitleMessage.time % 2 == 0) {  
                document.title = "【新资源】" + title  
            }  

            else {  
                document.title = "【　　　】" + title  
            };  
        }, 600);  
        return [TitleMessage.timer, TitleMessage.title];  
    },  
    // 取消新消息提示  
    clear: function () {
    	if(TitleMessage.timer==null) {
    		return;
    	}
        clearTimeout(TitleMessage.timer);  
        TitleMessage.timer = null;
        document.title = TitleMessage.title;  
    }  
};